

var stage = new createjs.Stage( "canvas" );
var initialPositionX = 400;
var initialPositionY = 50;
var initialVelocityX = 0;
var initialVelocityY = -40;


var box1 = new createjs.Shape();
box1.graphics.beginFill( "red" );
box1.graphics.drawRect( 0, 0, 50, 50 );

var boxContainer = new createjs.Container();
boxContainer.y = initialPositionY;
boxContainer.x = initialPositionX;
boxContainer.addChild( box1 );

stage.addChild( boxContainer );
stage.update();


createjs.Ticker.setFPS( 24 );
createjs.Ticker.addListener( this );

var timestep = 0;
var delta = .5;





function tick()
{
	//current X = Initial Position X + Initial Velocity X * Time Step
	boxContainer.x = initialPositionX + initialVelocityX * timestep;
	
	//current Y = Initial Position Y + Initial Velocity Y * Time Step + .5 * 9.81 * timestep * timestep;
	boxContainer.y = initialPositionY + initialVelocityY * timestep +
		.5* 9.81 * timestep * timestep;
	
	timestep = timestep + delta; 
	
	
	stage.update();
}

























